import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AppTodo } from './todolist/Todo.component';
import { AppUser } from './user/user.component'
// angular路由设置
// 这里与vue的路由相同
// ts版本设置路由与原生不同
const routes: Routes = [{
  path: 'todo', component: AppTodo,

}, {
  path: 'user', component: AppUser
}];
// 添加路由
@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
